package link.xieyu;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ConfigurationClassPostProcessor;

/**
 * @author xieyu
 */

/**
 * 没有配置basePackages时，无法自动扫描包内内容
 */
@ComponentScan("link.xieyu")
public class BeanBuilderConfig {
	{
		System.err.println("BeanBuilderConfig");
	}

	/**
	 * ConfigurationClassPostProcessor没有通过spring.xml配置bean的时候，此bean注解无效，这个bean注解的支持也在ConfigurationClassPostProcessor中
	 * @return
	 */
	@Bean
	public ConfigurationClassPostProcessor configurationClassPostProcessor(){
		return new ConfigurationClassPostProcessor();
	}

	@Bean
	public AnnoTest1 annoTest1(){
		return new AnnoTest1();
	}

}
